// 1992 Recoding

global keepers1992 ""

numlabel, add

genl id=serialno
global keepers1992 $keepers1992 id

genl year=1992
global keepers1992 $keepers1992 year

genl wt=wtfactor
global keepers1992 $keepers1992 wt

genl income=v921
recode income 97/99=.
genl income3=income
centile income, c(33 66 100)
replace income3=0 if income<=r(c_1)
centile income, c(33 66 100)
replace income3=1 if income>r(c_1) & income<=r(c_2)
centile income, c(33 66 100)
replace income3=2 if income>r(c_2) & income<=r(c_3)
global keepers1992 $keepers1992 income3

genl pid=va6a
replace pid=vb13a if va6a==. & vb13a~=.
genl pid_ce=pid
recode pid_ce 2/99=0
global keepers1992 $keepers1992 pid_ce

ren turnout turnout_
genl turnout=v7a
recode v7a 2 9=0
global keepers1992 $keepers1992 turnout

genl vote_ce=v9a
recode vote_ce -1=. 2/99=0
global keepers1992 $keepers1992 vote_ce

 
// Campaign Interest

codebook v1
gen intissuenew = v1
recode intissuenew 1=1 2=0 9=.
label variable intissuenew "cared about who won new"
label define care 1 "1=cared"
label values intissuenew care
tab v1 intissuenew
global keepers1992 $keepers1992 intissuenew


// Media Exposure

codebook v2a
gen npexpnew = v2a
recode npexpnew 1=1 2=0 9=.
label variable npexpnew "reads newspaper new"
label define reads 1 "1=reads np"
label values npexpnew reads
tab v2a npexpnew
global keepers1992 $keepers1992 npexpnew


// Ideology

codebook va36a
gen taxspendnew = va36a
recode taxspendnew 12=1 96=11 98=6 99=. 97=. -1=.
replace taxspendnew=(abs(taxspendnew-11))/10
label variable taxspendnew "social spending new"
label define spend 1 "1=pro-spending" 
label values taxspendnew spend
tab taxspendnew
tab va36a
global keepers1992 $keepers1992 taxspendnew

codebook v46a
gen unionregnew = v46a
recode unionregnew 8=3 9=.
replace unionreg=(abs(unionreg-5))/4
label variable unionregnew "gov't regulation of unions new"
label define reg 1 "1=increase regulation"
label values unionregnew reg
tab unionregnew v46a
global keepers1992 $keepers1992 unionregnew

codebook v45a
gen stateownnew = v45a
recode stateownnew 1=1 2=0 3=.5 8=.5 9=. 4=.
label variable stateownnew "nationalisation new"
label define natnlown 1 "1=pro-nationalisation"
label values stateownnew natnlown
tab stateownnew v45a
global keepers1992 $keepers1992 stateownnew

codebook v50i
gen stateownnew1992 = v50i
recode stateownnew1992 8=3 9=.
replace stateownnew1992 = (abs(stateownnew1992-5))/4
tab v50i stateownnew1992
label variable stateownnew1992 "nationalisation 1992 new"
label values stateownnew1992 natnlown
tab v50i stateownnew1992
global keepers1992 $keepers1992 stateownnew1992

codebook v44b
gen povertyspendnew = v44b
recode povertyspendnew 8=3 9=.
replace povertyspendnew = (abs(povertyspendnew-5))/4
label variable povertyspendnew "gov't spending on poverty reduction"
label values povertyspendnew spend
tab v44b povertyspendnew
global keepers1992 $keepers1992 povertyspendnew

codebook v47a
gen redistributenew = v47a
recode redistributenew 8=3 9=.
replace redistributenew=(abs(redistributenew-5))/4
tab v47a redistributenew
label variable redistributenew "gov't redistribution 1987 new"
label define redistrib 1 "1=pro-redistribution new"
label values redistributenew redistrib
tab v47a redistributenew
global keepers1992 $keepers1992 redistributenew

codebook v50a
gen welfarespendnew = v50a
recode welfarespendnew 8=3 9=.
gen flip = 6-welfarespend
replace flip = (abs(flip-5))/4
tab v50a flip
replace welfarespend = flip
drop flip
label variable welfarespendnew "welfare spending new"
label values welfarespendnew spend
tab v50a welfarespendnew
global keepers1992 $keepers1992 welfarespendnew

gen buspowernew = v51b
recode buspowernew 1=1 2=0 8=.5 9=.
label variable buspowernew "business power new"
label define powers 1 "1=too much power"
label values buspowernew powers
tab buspowernew v51b
global keepers1992 $keepers1992 buspowernew

gen unionpowernew = v51a
recode unionpowernew 1=1 2=0 8=.5 9=.
label variable unionpowernew "union power new"
label values unionpowernew powers
tab unionpowernew v51a
global keepers1992 $keepers1992 unionpowernew


// Class/occupation

// Assuming that husband is "head of household"
*gen class_head_grade = 
*recode class_head_grade 0=.
label define LblClassGoldHeath 1 "High grade prof./man." 2 "Low grade prof./man." 3 "Routine office" 4 "Sales & personal" 5 "Small petty bourg. w emps" 6 "Small petty bourg. wo emps" 7 "Farmers" 8 "Manual foremen" 9 "Skilled manual" 10 "Semi & unskilled manual" 11 "Agric. employees"
*label values class_head_grade LblClassGrade
*global keepers1992 $keepers1992 class_head_grade

gen class_resp_goldheath = v905_p
recode class_resp_goldheath -2=. -1=. 99=.
label values class_resp_goldheath LblClassGoldHeath
global keepers1992 $keepers1992 class_resp_goldheath

gen class_spou_goldheath = v908_p
recode class_spou_goldheath -2=. -1=. 99=.
label values class_spou_goldheath LblClassGoldHeath
global keepers1992 $keepers1992 class_spou_goldheath

gen male = v915b
recode male 1=1 2=0
global keepers1992 $keepers1992 male

gen married = v906a
recode married 1=1 2=1 3=0 4=0 5=0 9=0
global keepers1992 $keepers1992 married


gen unionmem_resp = v903c
recode unionmem_resp -2=. -1=. 1=1 2=1 3=0 9=.
global keepers1992 $keepers1992 unionmem_resp

gen unionmempast_resp = v903d
recode unionmempast_resp -3=. -2=. -1=. 1=1 2=1 3=0 9=.
global keepers1992 $keepers1992 unionmempast_resp

gen unionmem_spou = v906d
recode unionmem_spou -3=. -2=. -1=. 1=1 2=0 3=0 8=. 9=.
global keepers1992 $keepers1992 unionmem_spou

gen unionmempast_spou = v906d
recode unionmempast_spou -3=. -2=. -1=. 1=0 2=1 3=0 8=. 9=.
global keepers1992 $keepers1992 unionmempast_spou




// Economic perceptions

gen econ_ego_retro = v52c
recode econ_ego_retro 1=0 2=1 3=2 8/9=.
global keepers1992 $keepers1992 econ_ego_retro
